	$(function() {
		$("#left").load("../common/gover-left.html");
		var businessId = parseQueryString().businessId;
		var type = parseQueryString().type;
		$(".ystep1").loadStep({
			size: "small",
			color: "green",
			steps: [{
					title: "事项选择"
				},
				{
					title: "服务选择"
				},
				{
					title: "信息录入"
				},
				{
					title: "寄件选择"
				},
				{
					title: "取件选择"
				},
				{
					title: "提交成功"
				}
			]
		});
		$(".ystep1").setStep(1);
		my_vue = new Vue({
			el: '#vue_info',
			data: {
				itemsList: [],
				businessId: businessId,
				type: type,
				itemsId:""
			},
			methods: {
				backToChoose: function(){
					window.location = "selfHelpBusinessChoose.html?type="+type;
				},
				link: function(repoName,itemsId, userType) {
					sessionStorage.setItem('titleName',repoName);
					//window.location = "chooseServiceType.html?businessId=" + businessId + "&code=" + itemsId + "&userType=" + userType+"&type="+type;
					window.location = "information.html?businessId=" + businessId + "&code=" + itemsId + "&userType=" + userType+"&type="+type;
				},
				link: function(repoName,itemsId, userType) {
					this.itemsId=itemsId;
					sessionStorage.setItem('titleName',repoName);
					if(userType=='qt'){
						$.showConfirmType({
						'title': '',
						'content': '请选择办件类型',
						"showClose": false,
						"sureLabel": "个人办件",
						"cancelLabel": "公司办件",
						'sure':this.gr,
						'cancel':this.fr
					});
					}else{
					window.location = "information.html?businessId=" + businessId + "&code=" + itemsId + "&userType=" + userType+"&type="+type;
					}
					
				},
				fr:function(){
					window.location = "information.html?businessId=" + businessId + "&code=" + this.itemsId + "&userType=fr&type="+type;
				},
				gr:function(){
					window.location = "information.html?businessId=" + businessId + "&code=" + this.itemsId + "&userType=gr" + "&type="+type;
				},
				getItemsList: function() {
					doMask();
					this.$http.get(gover.getItemsList, {
						businessId: businessId,
						type: type
					}).then(function(result) {
						if(result.data.success) {
							unMask();
							this.itemsList = result.data.data.itemsList;
							console.log(toJson(result.data));
							if($("#empty").val()) {
								window.setTimeout("showRedMsg('','暂无事项!');", 1400);
							}
						} else {
							unMask();
							console.log(toJson(result.data.success));
							console.log(toJson(result.data));
							setTimeout("showRedMsg('','暂无事项!');", 1400);
						}
					}, function() {
						unMask();
						showRedMsg("message", "服务器正忙,请稍候重试");
						console.log('保存接口失败:' + toJson(result));
						top.$.closePopWin();

					})
				}

			},
			ready: function() {
				//初始化获得总页面数和列表数据
				this.getItemsList();
			}
		});
	});